import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/tutorial',
      name: 'tutorial',
      component: () => import('../views/TutorialHome.vue')
    },
    {
      path: '/creation',
      name: 'creation',
      component: () => import('../views/CreationView.vue')
    },
    {
      path: '/lifecycle',
      name: 'lifecycle',
      component: () => import('../views/LifecycleView.vue')
    },
    {
      path: '/directives',
      name: 'directives',
      component: () => import('../views/DirectivesView.vue')
    },
    {
      path: '/components',
      name: 'components',
      component: () => import('../views/ComponentsView.vue')
    },
    {
      path: '/computed',
      name: 'computed',
      component: () => import('../views/ComputedView.vue')
    },
    {
      path: '/styling',
      name: 'styling',
      component: () => import('../views/StylingView.vue')
    },
    {
      path: '/mixins',
      name: 'mixins',
      component: () => import('../views/MixinsView.vue')
    },
    {
      path: '/composition',
      name: 'composition',
      component: () => import('../views/CompositionView.vue')
    },
    {
      path: '/router',
      name: 'router',
      component: () => import('../views/RouterView.vue')
    },
    {
      path: '/axios',
      name: 'axios',
      component: () => import('../views/AxiosView.vue')
    },
    {
      path: '/elementplus',
      name: 'elementplus',
      component: () => import('../views/ElementPlusView.vue')
    }
  ]
})

export default router
